<?php
$db['order_setting']=array(
    'columns' =>
        array(
            'sid' => array(
                'type' => 'int unsigned',
                'required' => true,
                'pkey' => true,
                'editable' => false,
                'label' => '发票配置编号',
                'extra' => 'auto_increment',
            ),
            'payee_name' => array(
                    'type' => 'varchar(100)',
                    'label' => '开票方名称',
                    'in_list' => true,
                    'default_in_list' => true,
                    'width' => 80,
            ),
            'payee_operator' => array(
                    'type' => 'varchar(50)',
                    'label' => '开票人',
                    'in_list' => true,
            ),
            'content_id' => array(
                'type' => 'number',
                'default' => '1',
                'label' => '发票内容',
            ),
            'tax_rate' => array(
                'type' => 'tinyint(2)',
                'default' => '0',
                'label' => '税率',
                'in_list' => true,
                'default_in_list' => true,
                'width' => 60,
            ),
            'tax_no' => array(
                'type' => 'varchar(32)',
                'label' => '开票方税号',
                'in_list' => true,
                'default_in_list' => true,
                'width' => 80,
            ),
            'bank' => array(
                'type' => 'varchar(32)',
                'label' => '开票方开户银行',
            ),
            'bank_no' => array(
                'type' => 'char(32)',
                'label' => '开票方银行账号',
            ),
            'telephone' => array(
                'type' => 'char(32)',
                'label' => '开票方电话',
                'in_list' => true,
                'default_in_list' => true,
                'width' => 60,
            ),
            'address' => array(
                'type' => 'varchar(255)',
                'label' => '开票方地址',
                'in_list' => true,
                'default_in_list' => true,
                'width' => 60,
            ),
            'provider_appkey' => array(
                'type' => 'varchar(100)',
                'label' => '开票服务商的APPKEY',
                'in_list' => true,
                'default_in_list' => true,
                'width' => 60,
            ),
            'dateline' => array(
                'type' => 'time',
                'label' => '添加时间',
                'width' => 130,
                'in_list' => true,
                'default_in_list' => true,
                'filtertype' => 'time',
                'filterdefault' => true,
            ),
            'shop_id' => array(
                'type' => 'table:shop@ome',
                'required' => true,
                'editable' => false,
                'label' => '应用到的店铺ID',
            ),
            'billing_shop_node_id' => array(
                'type' => 'varchar(32)',
                'editable' => false,
                'label' => '开票服务店铺节点号',
            ),
            'einvoice_operating_conditions' => array(
                'type' => array(
                    1=>'已发货',
                    2=>'已付款',
                ),
                'default' => 1,
                'editable' => false,
                'label' => '电子发票操作条件',
            ),
    ),
    'index' =>
    array (
        'ind_shop_id' =>
        array (
            'columns' =>
            array (
                    0 => 'shop_id',
            ),
            'prefix' => 'unique',
        ),
        'ind_content_id' =>
        array (
            'columns' =>
            array (
                    0 => 'content_id',
            ),
        ),
    ),
    'comment' => '订单发票配置表',
    'engine' => 'innodb',
    'version' => '$Rev:  $',
);